package com.chenfan.mcn.service;

import com.chenfan.mcn.dao.IncomeContactAgreementMapper;
import com.chenfan.common.extension.mybatisplus.enhanced.EnhancedService;
import com.chenfan.mcn.model.IncomeContractAgreement;
import com.chenfan.mcn.model.dto.IncomeAgreementAddDTO;
import com.chenfan.mcn.model.vo.ContractAgreementVO;

import java.util.List;

/**
 * @author tangwei
 * Date:     2021/1/26 10:13
 * Description: 收入合同补充协议
 */
public interface IncomeContactAgreementService extends EnhancedService<IncomeContactAgreementMapper, IncomeContractAgreement> {

    /**
     * 新增/修改
     *
     * @param agreementAddDTO
     * @return Integer
     */
    boolean saveAgreement(IncomeAgreementAddDTO agreementAddDTO);

    /**
     * 获取指定收入合同下的所有收入合同补充协议
     *
     * @param incomeContractId
     * @param contractType
     * @return List<ContractAgreementVO>
     */
    List<ContractAgreementVO> agreementList(Long incomeContractId, Integer contractType);

    /**
     * 修改单据状态
     *
     * @param agreementId    {@link Long}
     * @param approvalStatus {@link Integer}
     * @return {@link boolean}
     */
    boolean changeStatus(Long agreementId, Integer approvalStatus);
}